package mygreencart

class BaseTagLib {

   def localizedLink = { attrs, body ->
      attrs.mapping = message(code:'locale') + StringUtils.toUpperCaseFristLetter(attrs.mapping)

      //def applicationTagLib = grailsApplication.mainContext.getBean('org.codehaus.groovy.grails.plugins.web.taglib.ApplicationTagLib')
      //applicationTagLib.link.call(attrs, body)

      out << link(attrs,body)
   }
}


class StringUtils {
   static def toUpperCaseFristLetter(String text){
      text[0].toUpperCase() + text[1..-1]
   }
}